Web Design Tips and Tricks
--edited by Dave Methvin, Executive Editor, Windows Magazine
Did you ever see something cool inside a web page, and just couldn't
figure out how they did it? I've put together a list of useful things
that you can do on web pages, and put each inside a small file so you
can tell what's going on.
Once you've jumped to a sample page you should
take a look at the HTML source. (In Netscape Navigator use the menu item
View/Document Source;
in Microsoft Internet Explorer use
View/Source.)
I've imbedded comments that point out the important coding in each
example.
* * * 7/19/96: Many of the JavaScript examples have been improved! * * *
HTML Tricks
- Calendar:
Show the months of the year using an HTML table. Demonstrates both
a numbers-only format and a larger calendar that has short notes in some
of the dates.
- Turn off caching of a page:
If you have a page that changes often (like every few minutes), this
shows you how to tell a browser not to cache your page.
- Change-of-Address page:
When you move a popular web page, it's a good idea to leave a
forwarding page at the old address. Here's one that will
automatically take browsers to the new address after a short pause.
JavaScript Tricks
These tricks require Netscape Navigator 2.0 or later. Most also run
on the Internet Explorer 3.0 Beta.
- Go Back button:
Takes you back to the previous page you had visited, no
matter where it was.
- Goto Box:
Here's how to build a drop-down list box that lets users choose
where they want to go.
- Status line ticker:
As seen on the Web! Yet another JavaScript program to make your
browser's status line resemble Times Square!
- Text box marquee:
If you prefer not to mess up your status line, try this little
scrolling marquee that can go anywhere in your HTML page.
- Mystery typewriter:
Who's that typing on my status line?
- Fade-in background:
When you load this page it will start with one color background, then
fade to another color.
- Random Number Generator/Tester:
Demonstrates how to 1) get a decent random number, 2) generate HTML
on the fly using Javascript, and 3) make a bar graph using only HTML
tags. It's a bit complicated but full of useful information.
[Back to Web Resource Center]
Copyright ⌐ 1996 CMP Publications Inc.